package com.sxt.mapper;

import com.sxt.domain.BusCustomer;
import com.sxt.query.BusCustomerQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 客户数据操作接口
 */
public interface BusCustomerDao {

    /**
     * 根据参数查询客户列表
     *
     * @param query
     * @return
     */
    List<BusCustomer> selectList(BusCustomerQuery query);

    /**
     * 校验客户关键字是否重复
     *
     * @param query 包含 身份证号/手机号
     * @return
     */
    BusCustomer selectCustomerByKeywords(BusCustomerQuery query);

    /**
     * 新增客户
     *
     * @param busCustomer
     */
    void insert(BusCustomer busCustomer);

    /**
     * 更新客户数据
     *
     * @param busCustomer
     */
    void update(BusCustomer busCustomer);

    /**
     * 批量新增客户
     *
     * @param busCustomers
     */
    void batchInsert(@Param("customers") List<BusCustomer> busCustomers);
}
